lyric_finder 0.1.6

A lyric finder library
Documentation

lyric_finder

This crate provides a [Client] struct for retrieving a song's lyric.

It ultilizes the Genius website and its APIs to get lyric data.

Example

# use anyhow::Result;
#
# async fn run() -> Result<()> {
let client =  lyric_finder::Client::new();
let result = client.get_lyric("shape of you").await?;
match result {
lyric_finder::LyricResult::Some {
track,
artists,
lyric,
} => {
println!("{} by {}'s lyric:\n{}", track, artists, lyric);
}
lyric_finder::LyricResult::None => {
println!("lyric not found!");
}
}
# Ok(())
# }